package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.JtOrderOperateLogMapper;
import com.ruoyi.business.domain.JtOrderOperateLog;
import com.ruoyi.business.service.IJtOrderOperateLogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单操作日志Service业务层处理
 * 
 * @author Alan Zhang
 * @date 2025-06-08
 */
@Service
public class JtOrderOperateLogServiceImpl implements IJtOrderOperateLogService 
{
    @Autowired
    private JtOrderOperateLogMapper jtOrderOperateLogMapper;

    /**
     * 查询订单操作日志
     * 
     * @param logId 订单操作日志主键
     * @return 订单操作日志
     */
    @Override
    public JtOrderOperateLog selectJtOrderOperateLogByLogId(Long logId)
    {
        return jtOrderOperateLogMapper.selectJtOrderOperateLogByLogId(logId);
    }

    /**
     * 查询订单操作日志列表
     * 
     * @param jtOrderOperateLog 订单操作日志
     * @return 订单操作日志
     */
    @Override
    public List<JtOrderOperateLog> selectJtOrderOperateLogList(JtOrderOperateLog jtOrderOperateLog)
    {
        return jtOrderOperateLogMapper.selectJtOrderOperateLogList(jtOrderOperateLog);
    }

    /**
     * 新增订单操作日志
     * 
     * @param jtOrderOperateLog 订单操作日志
     * @return 结果
     */
    @Override
    public int insertJtOrderOperateLog(JtOrderOperateLog jtOrderOperateLog)
    {
        jtOrderOperateLog.setCreateTime(DateUtils.getNowDate());
        return jtOrderOperateLogMapper.insertJtOrderOperateLog(jtOrderOperateLog);
    }

    /**
     * 修改订单操作日志
     * 
     * @param jtOrderOperateLog 订单操作日志
     * @return 结果
     */
    @Override
    public int updateJtOrderOperateLog(JtOrderOperateLog jtOrderOperateLog)
    {
        return jtOrderOperateLogMapper.updateJtOrderOperateLog(jtOrderOperateLog);
    }

    /**
     * 批量删除订单操作日志
     * 
     * @param logIds 需要删除的订单操作日志主键
     * @return 结果
     */
    @Override
    public int deleteJtOrderOperateLogByLogIds(String logIds)
    {
        return jtOrderOperateLogMapper.deleteJtOrderOperateLogByLogIds(Convert.toStrArray(logIds));
    }

    /**
     * 删除订单操作日志信息
     * 
     * @param logId 订单操作日志主键
     * @return 结果
     */
    @Override
    public int deleteJtOrderOperateLogByLogId(Long logId)
    {
        return jtOrderOperateLogMapper.deleteJtOrderOperateLogByLogId(logId);
    }
}
